<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let obj = {
      name: "小米10青春版",
      num: 8208208820,
      weigth: "0.55kg",
      money: "1000元"
    }
    for (let j in obj) {
      // document.write(`${j}：`)
      document.write(obj[j])
      document.write(`<br>`)
    }

    // document.write(obj.name)
    // document.write('<br>')
    // document.write(obj.num)
    // document.write('<br>')
    // document.write(obj.weigth)
    // document.write('<br>')
    // document.write(obj.money)
    // document.write('<br>')

    // console.log(obj);
    // console.log(obj.name);
    // console.log(obj.money);
    // console.log(obj['num']);

    // 修改值   先赋予一个值
    // obj.money = "2500"
    // console.log(obj.money);
    // console.log(obj);

    // //新增
    // obj.color = "pink"
    // console.log(obj);

    // //删除
    // delete obj.color
    // console.log(obj);
  </script>
</body>

</html>